import React from 'react'
import style from './index.less'
import { connect } from 'dva';
import { Row, Col, Icon,Input  } from 'antd';
import moment from 'moment';
import { NoData } from '../../../components';
import DefinitionList from '../../../components/DefinitionList';
import Keywords from '../../../components/toolbar/Keywords';

const ToolBar = ({ keywords, location }) => (
  <Row className='toolbar' type="flex" justify="space-between">
    <Col>
      <Icon type="search" style={{ fontSize: 18 }} />Search
    </Col>
    <Col>
      <DefinitionList name='关键字：' value={<Keywords value={keywords} location={location}/>} />
    </Col>
  </Row>
)

import { Tabtitle } from '../../../components'
import MenuList from '../components/MenuList'
import ResearchList from '../components/ResearchList'

const ResearchReport = ({  researchReport,location, dispatch }) => {

  const props = {
    ...researchReport,
    location,
  }

  
  return (
    <div className={`${style.root}`}>
      <Tabtitle value={'投研报告'} />
      <ToolBar {...props}/>
      <div className="content-inner">
        <Row className='contentDisplay'>
          <Col>
        <ResearchList type='MacroscopicalResearchList' keywords={props.keywords} data={props.macroscopicalResearchList} />
          </Col>
        </Row>
      </div>
    </div>
  );
}

export default connect(({ researchReport }) => ({ researchReport }))(ResearchReport)